<?php
    $ne=array("id"=>"1","title"=>"标题1","time"=>"2020-1-1");
    // var_dump($n);

    $news=array(array("id"=>"1","title"=>"标题1","addtime"=>"2020-1-1"),
        array("id"=>"2","title"=>"标题2","addtime"=>"2020-1-2"));
    // var_dump($news);
    //echo $ne["title"];
    //require "news.html";
?>
 <h1><?php echo $news[1]["title"]; ?></h1>
<table border="1">
    <tr>
        <td>id</td>
        <td>标题</td>
        <td>日期</td>
    </tr>
    <?php foreach($news as $n):?>
		<tr>
			<td><?php echo $n['id'];?></td>
			<td>
                <a href="show.php?id=<?php echo $n['id'];?>"><?php echo $n['title'];?>
                </a>
            </td>
            <td><?php echo $n['addtime'];?>　</td>
            
		</tr>
	<?php endforeach;?>
</table> 